
<div class="form-group">
<?php if ($input['type'] == 'text') : ?>
    <label for="input<?php echo $input['name']; ?>" class="col-md-3"><?php echo $input['label']; ?></label>
    
    <div class="form-group col-md-8 input">
        <?php if (empty($input['lang'])) : ?>
        <input type="text" name="<?php echo $input['name']; ?>" value="<?php echo isset($item->{$input['name']}) ? set_value($input['name'], $item->{$input['name']}) : set_value($input['name']); ?>" class="form-control" id="<?php echo $kSect.'_'.$kInput.'_'.$input['name']; ?>" data-default="<?php echo isset($input['default'])?$input['default']:''; ?>" />
	    <?php else : ?>
        <div class="input_lang">
	       <?php foreach ($languages AS $lang => $language) : ?>
           <input style="display:<?php echo ($lang == $this->session->userdata('lang')) ? 'block' : 'none'; ?>;" type="text" name="<?php echo $input['name'].'_'.$lang; ?>" value="<?php echo isset($item->{$input['name']}[$lang]) ? set_value($input['name'].'_'.$lang, $item->{$input['name']}[$lang]) : set_value($input['name'].'_'.$lang); ?>" class="form-control input_<?php echo $lang; ?>" id="<?php echo $kSect.'_'.$kInput.'_'.$input['name'].'_'.$lang; ?>" data-default="<?php echo isset($input['default'])?$input['default']:''; ?>" />
	       <?php endforeach; ?>
        </div>
	    <?php endif; ?>
        
        <?php if (!empty($input['desc'])) : ?>
        <p class="help-block"><?php echo $input['desc']; ?></p>
        <?php endif; ?>
        <?php echo form_error($input['name'], '<span class="error">', '</span>'); ?>
    </div> <!-- /controls -->
    
    <?php if (!empty($input['lang'])) : ?>
        <?php include(((BASEPATH == '/')?'':dirname(BASEPATH)).'/'.APPPATH.'views/Templates/FormHelper/formLangHelper.php'); ?>
    <?php endif; ?>

<?php elseif ($input['type'] == 'textarea') : ?>
    <label for="input<?php echo $input['name']; ?>" class="col-md-3"><?php echo $input['label']; ?></label>
    
    <div class="form-group col-md-8 input">
        <?php if (empty($input['lang'])) : ?>
        <textarea name="<?php echo $input['name']; ?>" class="form-control" id="<?php echo $kSect.'_'.$kInput.'_'.$input['name']; ?>" data-default="<?php echo isset($input['default'])?$input['default']:''; ?>" rows="3"><?php echo isset($item->{$input['name']}) ? set_value($input['name'], $item->{$input['name']}) : set_value($input['name']); ?></textarea>
        <?php else : ?>
        <div class="input_lang">
	       <?php foreach ($languages AS $lang => $language) : ?>
           <textarea style="display:<?php echo ($lang == $this->session->userdata('lang')) ? 'block' : 'none'; ?>;" name="<?php echo $input['name'].'_'.$lang; ?>" class="form-control input_<?php echo $lang; ?>" id="<?php echo $kSect.'_'.$kInput.'_'.$input['name'].'_'.$lang; ?>" data-default="<?php echo isset($input['default'])?$input['default']:''; ?>" rows="3"><?php echo isset($item->{$input['name']}[$lang]) ? set_value($input['name'].'_'.$lang, $item->{$input['name']}[$lang]) : set_value($input['name'].'_'.$lang); ?></textarea>
           <?php endforeach; ?>
        </div>
	    <?php endif; ?>
        
        <?php if (!empty($input['desc'])) : ?>
        <p class="help-block"><?php echo $input['desc']; ?></p>
        <?php endif; ?>
        <?php echo form_error($input['name'], '<span class="error">', '</span>'); ?>
    </div> <!-- /controls -->
    
    <?php if (!empty($input['lang'])) : ?>
        <?php include(((BASEPATH == '/')?'':dirname(BASEPATH)).'/'.APPPATH.'views/Templates/FormHelper/formLangHelper.php'); ?>
    <?php endif; ?>

<?php endif; ?>
</div>